{include file="public/head"}
<!--loading页开始-->
<div class="loading">
	<div class="loader">
        <div class="loader-inner pacman">
          <div></div>
          <div></div>
          <div></div>
          <div></div>
          <div></div>
        </div>
	</div>
</div>
<!--loading页结束-->
	<body>
		<header class="mui-bar mui-bar-nav report-header box-s" id="header">
			<a href="javascript:history.go(-1)"><i class="iconfont icon-fanhui fl"></i></a>
			<p>管理收货地址</p>
	    </header>
	    <div id="main" class="mui-clearfix contaniner">
	    	{volist name="data" id="vo" }
	    	<div class="addlist clearfloat">
	    		<div class="top clearfloat box-s">
	    			<ul>
	    				<li>
	    					<span class="fl">{$vo.receive_name}</span>
	    					<span class="fr">{$vo.phone}</span>
	    				</li>
	    				<li>
	    					{$vo.room_address}
	    				</li>
	    			</ul>
	    		</div>
	    		<div class="bottom clearfloat box-s">
	    			<section class="shopcar clearfloat">
						<div class="radio fl"> 
						    <label>
						        <input type="radio" name="address" {if $vo.default=="1"}checked{/if}  onclick="addressDefault({$vo.address_id})" >
						        <div class="option"></div>
						        <span class="mradd smradd fl">设为默认</span>
						    </label>
						</div>
						
						<div class="right fr clearfloat">
							<a href="#" class="fr">
								<i class="iconfont icon-lajixiang"></i>
								删除
							</a>							
						</div>
					</section>
	    		</div>
	    	</div>
	    	{/volist}
	    	
	    
     	<a href="{:url('addAddress')}" class="address-add fl">
     		添加新地址
     	</a>

     {include file="public/bottom"}
	</body>
</html>
<script>
	function addressDefault(t){
		//  $('input[id="sc_ct"]').filter(':checked').val();
		$.get("{:url('addressDefault')}",{address_id:t},function(res){
			if(res){
				alert('设置成功');
			}
		},'html')
	}
</script>